package model.data;

public class Ad implements Comparable {
	private String id;
	private String enddate;
	
	public Ad(String id, String enddate) {
		this.id = id;
		this.enddate = enddate;
	}
	
	public int hashCode() {
		return id.hashCode();
	}
	
	public String toString() {
		return id;
	}
	
	public boolean equals(Object o) {
		Ad a = (Ad)o;
		return a.hashCode() == id.hashCode();
	}

	public String getEndDate() {
		return enddate;
	}

	public int compareTo(Object arg0) {
		Ad a = (Ad)arg0;
		return enddate.compareTo(a.enddate);
	}
}